# -*- coding: utf-8 -*-
# @Author : 左手
# @File : 03-requests-html属性.py
# @Software: PyCharm
# @Date : 2024/10/22 21:20


# 导包
from requests_html import HTMLSession

# 实例化
se = HTMLSession()

# 准备url
url = 'https://www.sogou.com'

# 发请求  想要额外携带参数  正常语法操作
res = se.get(url)
# print(res.html.absolute_links)  # absolute: 绝对，返回的就是绝对链接
# print(res.html.links) # https
print(res.html.base_url)